package com.vogue.supplymall.order.domain.dao.impl;

import com.vogue.supplymall.common.domain.dto.RefundMaxCountInfo;
import com.vogue.supplymall.order.domain.dao.RefundDetailDao;
import com.vogue.supplymall.order.domain.mapper.RefundDetailMapper;
import com.vogue.supplymall.order.domain.model.RefundDetail;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * The type Refund detail dao.
 *
 * @aouthor: zhangliang
 * @date: Create in 2018-03-16
 */
@Repository("refundDetailDao")
public class RefundDetailDaoImpl extends BaseDaoImpl<RefundDetail, Long> implements RefundDetailDao {
    @Resource
    private RefundDetailMapper refundDetailMapper;

    @Override
    public List<Map<String, Object>> findRefundOrderDetail(Long refundOrderId) {
        return refundDetailMapper.findRefundOrderDetail(refundOrderId);
    }

    @Override
    public List<Map<String, Object>> findRefundOrderRefundUpload(Long refundOrderId) {
        return refundDetailMapper.findRefundOrderRefundUpload(refundOrderId);
    }

    @Override
    public List<Map<String, Object>> getRefundMaxQuantity(RefundMaxCountInfo refundMaxCountInfo) {
        return refundDetailMapper.findRefundMaxQuantity(refundMaxCountInfo);
    }

    @Override
    public Integer findRefundquantitySum(Long oiid) {
        return refundDetailMapper.findRefundquantitySum(oiid);
    }
}
